home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form ConnForm
- Caption = "Connection Services Test"
- ClientHeight = 3225
- ClientLeft = 2340
- ClientTop = 1710
- ClientWidth = 3585
- Height = 3630
- Left = 2280
- LinkMode = 1 'Source
- LinkTopic = "Form1"
- ScaleHeight = 3225
- ScaleWidth = 3585
- Top = 1365
- Width = 3705
- Begin CommandButton OKButton
- Caption = "&OK"
- Height = 372
- Left = 1440
- TabIndex = 4
- Top = 2760
- Width = 732
- End
- Begin ListBox connList
- Height = 615
- Left = 240
- TabIndex = 9
- Top = 2040
- Width = 3135
- End
- Begin Label Label7
- Caption = "Login Time"
- Height = 252
- Left = 1680
- TabIndex = 11
- Top = 1680
- Width = 972
- End
- Begin Label Label6
- Caption = "Conn #"
- Height = 252
- Left = 240
- TabIndex = 10
- Top = 1680
- Width = 732
- End
- Begin Label Label5
- Caption = "You are connected at:"
- Height = 252
- Left = 120
- TabIndex = 8
- Top = 1320
- Width = 2292
- End
- Begin Label socketLabel
- Height = 252
- Left = 1800
- TabIndex = 7
- Top = 960
- Width = 1572
- End
- Begin Label Label4
- Alignment = 1 'Right Justify
- Caption = "Socket:"
- Height = 252
- Left = 600
- TabIndex = 3
- Top = 960
- Width = 852
- End
- Begin Label nodeLabel
- Height = 252
- Left = 1800
- TabIndex = 6
- Top = 720
- Width = 1572
- End
- Begin Label Label3
- Alignment = 1 'Right Justify
- Caption = "Node:"
- Height = 252
- Left = 600
- TabIndex = 2
- Top = 720
- Width = 852
- End
- Begin Label networkLabel
- Height = 252
- Left = 1800
- TabIndex = 5
- Top = 480
- Width = 1572
- End
- Begin Label Label2
- Alignment = 1 'Right Justify
- Caption = "Network:"
- Height = 252
- Left = 600
- TabIndex = 1
- Top = 480
- Width = 852
- End
- Begin Label Label1
- Caption = "Your internetwork address:"
- Height = 252
- Left = 120
- TabIndex = 0
- Top = 120
- Width = 2412
- End
- Sub Form_Load ()
- Dim nodeAddr As NodeAddress
- Static conns(MAX_CONNS) As Long
- Static liT As DATE_AND_TIME
- connNum& = GetConnectionNumber()
- ccode% = GetInternetAddress(connNum&, network&, nodeAddr, socket%)
- If (ccode% <> SUCCESSFUL) Then
- MsgBox "Unable to get connection number for connection " + Format$(connNum&), MB_OK, "Error"
- Else
- networkLabel.Caption = Hex$(LongSwap(network&))
- nodeLabel.Caption = Hex$(LongSwap(nodeAddr.nodeHi)) + Hex$(IntSwap(nodeAddr.nodeLo))
- socketLabel.Caption = Hex$(IntSwap(socket%))
- myName$ = String$(48, 0)
- ccode% = GetConnectionInformation(connNum&, myName$, OT_USER, objectID&, liT)
- If (ccode% <> SUCCESSFUL) Then
- MsgBox "Unable to get connection information for connection " + Format$(connNum&), MB_OK, "Error"
- Else
- ccode% = GetObjectConnectionNumbers(myName$, OT_USER, numConns&, conns(0), MAX_CONNS)
- If (ccode% <> SUCCESSFUL) Then
- MsgBox "Unable to get connection number for " + myName$, MB_OK, "Error"
- Else
- For i% = 0 To (numConns& - 1)
- ccode% = GetConnectionInformation(conns(i%), myName$, OT_USER, objectID&, liT)
- If (ccode% <> SUCCESSFUL) Then
- MsgBox "Unable to get connection information for connection " + Format$(connNum&), MB_OK, "Error"
- Else
- temp$ = Str$(conns(i%)) + Space$(15)
- temp$ = temp$ + Format$(Asc(liT.hour), "00") + ":" + Format$(Asc(liT.minute), "00") + ":" + Format$(Asc(liT.second), "00") + " "
- temp$ = temp$ + Format$(Asc(liT.month), "00") + "/" + Format$(Asc(liT.date), "00") + "/" + Format$(Asc(liT.year), "00")
- connList.AddItem temp$
- End If
- Next
- End If
- End If
- End If
- End Sub
- Sub OKButton_Click ()
- Unload ConnForm
- End Sub
-